package com.yc.io;

import java.io.*;

/**
 * author: yc
 * description: ${description}
 * date: 2022/1/10 11:11
 */
public class Other1 {
    public static void main(String[] args) {
        Other1 o = new Other1();
        o.m1();
    }



    public void m1() {
        //读入文本文件
        try {
            Reader r = new FileReader("D:\\source\\word\\项目\\小桔充电\\errorCode.txt");
            BufferedReader bufferedReader = new BufferedReader(r);
            String str = "";
            while ((str = bufferedReader.readLine()) != null) {
//                System.out.println(str);query_start_charge
                //拼接sql:INSERT INTO CddCooperation..XiaojuCodeDict(CodeType, ErrorCode, ErrorMsg) VALUES ('notification_charge_order_info', 1000, '直流充满停止');
                String sql = "INSERT INTO CddCooperation..XiaojuCodeDict(CodeType, ErrorCode, ErrorMsg) VALUES ('query_start_charge', " + str.split("\t")[0] + ", '" + str.split("\t")[1] + "');";
                System.out.println(sql);
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
